package com.silver.weibo.server.Impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.silver.weibo.dao.LikesMapper;
import com.silver.weibo.entity.Likes;
import com.silver.weibo.server.LikeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class LikeServiceImpl extends ServiceImpl<LikesMapper, Likes> implements LikeService {

    private final LikesMapper likesMapper;

    @Autowired
    public LikeServiceImpl(LikesMapper likesMapper) {
        this.likesMapper = likesMapper;
    }

    @Override
    public Likes selectAllByUserIdAndBlogId(Likes likes) {
        return likesMapper.selectAllByUserIdAndBlogId(likes);
    }

    @Override
    public Boolean updateDel(Likes likes) {
        return likesMapper.updateDel(likes);
    }
}
